package composite;

import java.util.ArrayList;
import java.util.List;

public class College extends OrganizationComponent {
    List<OrganizationComponent> organizationComponents = new ArrayList<OrganizationComponent>();

    protected College(String name, String des) {
        super(name, des);
    }

    @Override
    protected void print() {
        System.out.println("----------" + getName() + ", " + getDes() + "----------");
        for(OrganizationComponent organizationComponent : organizationComponents) {
            organizationComponent.print();
        }
    }

    protected void add(OrganizationComponent oc) {
        organizationComponents.add(oc);
    }

    protected void remove(OrganizationComponent oc) {
        organizationComponents.remove(oc);
    }
}
